<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
	<title>权限管理系统 -  修改密码</title>
	<meta th:remove="tag" th:include="base/include :: head" />
	<script type="text/javascript">
		$(function(){
			//左边当前菜单高亮，inculde里定义
			activeLeftNav("usermanage");
			
			$(".form-horizontal").submit(function(form){
				var newPassword = $.trim($("#newPassword").val());
				var confirmPassword = $.trim($("#confirmPassword").val());
				if(newPassword!=confirmPassword){
					alert("确认密码与新密码不一致！")
					return false ;
				}
				
				form.submit();
			});
		});
	</script>
</head>
<body>
	<!-- 头部 -->
	<div th:replace="base/include :: top"></div>

    <div class="container-fluid">
      <div class="row">
        <!-- 左边菜单 -->
        <div th:replace="base/include :: left"></div>
        
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        	<ol class="breadcrumb">
			  <li><a th:href="@{/}" href="#">主页</a></li>
			  <li><a th:href="@{/user/findUsers}" href="#">用户管理</a></li>
			  <li class="active">修改密码</li>
			</ol>
			<form class="form-horizontal" role="form" th:action="@{/user/saveMyPassWord}" method="post">
			  <div class="form-group">
			    <label for="oldPassword" class="col-sm-4 control-label">原密码</label>
			    <div class="col-sm-4">
			      <input type="password" class="form-control" id="oldPassword"  required="required"
			      				name="oldPassword" placeholder="请输入原密码" autofocus="true" />
			    </div>
			    <div class="col-sm-4"></div>
			  </div>
			  <div class="form-group">
			    <label for="newPassword" class="col-sm-4 control-label">新密码</label>
			    <div class="col-sm-4">
			      <input type="password" class="form-control" id="newPassword" required="required" 
			      				name="newPassword" placeholder="请输入新密码" />
			    </div>
			    <div class="col-sm-4"></div>
			  </div>
			  <div class="form-group">
			    <label for="confirmPassword" class="col-sm-4 control-label">确认新密码</label>
			    <div class="col-sm-4">
			      <input type="password" class="form-control" id="confirmPassword" required="required" 
			      				name="confirmPassword" placeholder="请输入新密码" />
			    </div>
			    <div class="col-sm-4"></div>
			  </div>
			  <div class="form-group">
			    <div class="col-sm-offset-5 col-sm-1">
			      <button type="submit" class="btn btn-primary btn-lg btn-block">提交</button>
			    </div>
			    <div class="col-sm-6"></div>
			  </div>
			</form>
          
        </div>
      </div>
    </div>
   </body>
</html>